package architecture;

//MUX
public class MUX{
	MyInt src0;
	MyInt src1;
	MyInt src2;
	MyInt src3;
	MyInt src4;
	MyInt src5;
	MyInt result;
	MyInt cond;
	void clockEvent(){
		switch(cond.i){
		case 0:
			MyUtil.transfer(src0, result);
			break;
		case 1:
			MyUtil.transfer(src1, result);
			break;
		case 2:
			MyUtil.transfer(src2, result);
			break;
		default:
			assert(false);
		}
	}
	void dump(){
		System.out.println("--------");
		System.out.println("MUX:");
		System.out.println("src0:"+src1);
		System.out.println("src1:"+src1);
		System.out.println("src2:"+src2);
		System.out.println("cond:"+cond);
		System.out.println("result:"+result);
		System.out.println("--------");
	}
}